package cn.gdrj.est.exception;

import cn.gdrj.est.constants.ResultEnum;

public class BusinessException extends RuntimeException{

    private String code = "-1";

    public BusinessException(String msg){
        super(msg);
    }

    public BusinessException(String code,String msg){
        super(msg);
        this.code= code;
    }

    public BusinessException(ResultEnum resultEnum){
        super(resultEnum.getMsg());
        this.code= resultEnum.getCode();
    }

    public String getCode() {
        return code;
    }
}
